<template>
  <el-dialog :title="title" :close-on-click-modal="false" :fullscreen="true" :visible.sync="visible"
    :before-close="cancel" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="50%">

    <div class="block">

    <el-timeline-item timestamp="试题内容" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">

          <el-col :span="24">
            <el-form-item label="难易程度" prop="FCATLEVEL">
              <el-radio v-model="radio" label="1">☆</el-radio>
              <el-radio v-model="radio" label="2">☆☆</el-radio>
              <el-radio v-model="radio" label="3">☆☆☆</el-radio>
              <el-radio v-model="radio" label="4">☆☆☆☆</el-radio>
              <el-radio v-model="radio" label="5">☆☆☆☆☆</el-radio>
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="题目" prop="FCATNAME">
              <el-input
                type="textarea"
                :rows="5"
                placeholder="请输入内容"
                v-model="textarea">
              </el-input>
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="参考答案" prop="FANSWER">
              <el-input v-model="dataForm.FANSWER"  />
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="知识点" prop="FKNOW">
              <el-input
                type="textarea"
                :rows="5"
                placeholder="请输入内容"
                v-model="textarea2">
              </el-input>
            </el-form-item>
          </el-col>

        </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="添加解析" placement="two">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
        <el-col :span="24">
            <el-form-item label="答案解析" prop="FANALY">
              <el-input
                type="textarea"
                :rows="5"
                placeholder="请输入内容"
                v-model="textarea2">
              </el-input>
            </el-form-item>
          </el-col>
         </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>

</div>

  </el-dialog>
</template>
<script>
  import jnpf from "@/utils/jnpf"
  export default {
    components: {  },
    props: {
      formationlist: {
        type: Array,
        default: [],
      },
    },
    data() {
      return {
        radio:'3',
        textarea: '同意该项目',
        value1: new Date(2024, 12, 2, 12, 0),

        title: "新增",
        insertorupdate: true,
        dataForm: {
          FBILLNO: "K241130001", 
            FBILLCREDATE:"2024-11-29",
            FUSER: "曹操",
            FHOME: "化学与材料科学学院",
            FTEACH:"秦始皇",
            FGROUP: "分析测试中心",
            FBEGDATE: "2025-02-01",
            FENDDATE:"2025-04-30",
            FMEMO: "分三个阶段执行",
            FCATNAME:"医疗垃圾智慧处理系统",
            FWEEK: "3个月",
            FNUM: 4,
            FMONEY: "10万",
            FNOTE:"",
            FBILLTYPE:"研究生",
            FBILLSTATE: "已通过"
        },
        rules: {
          FCATLEVEL:[
            { required: true, message: '请输入学籍号码', trigger: 'blur' },
          ],
          FCATNAME: [
            { required: true, message: '请输入申请人员', trigger: 'blur' },
          ],
          FKNOW: [
            { required: true, message: '请输入申请理由', trigger: 'blur' },
          ],
        },
        list: [{  "FENTRYID":1,
                  "FEQUIPNO": "98001",
                  "FEQUIPNAME": "通风柜1-1"
                },
                { "FENTRYID":2,
                  "FEQUIPNO": "98002",
                  "FEQUIPNAME": "通风柜1-2"
                }],

        loading: false,
        visible: false,

        //所属校区选择数据
        options1: [{
          value: '1',
          label: '申请中'
        }, {
          value: '2',
          label: '已通过'
        }, {
          value: '3',
          label: '已驳回'
        }],

        //所属校区选择数据
        options2: [{
          value: '1',
          label: '本院人员'
        }, {
          value: '2',
          label: '培训人员'
        }, {
          value: '3',
          label: '外来人员'
        }],
        
      };
    },
    created() {
    },
    mounted() { },
    methods: {
      //
      init(FBILLNO) {
        this.dataForm.FBILLNO = FBILLNO;
        if (this.dataForm.FBILLNO) {
          this.title = "修改"
          this.insertorupdate = false;
        }
        else {
          this.title = "新增"
          this.dataForm.FBILLNO = "K" + Math.floor(Math.random() * 10000000) + 1;
          this.insertorupdate = true;
        }
        this.visible = true;
      },
      shoplist(data) {
        data.forEach(item => {
          this.list.push({
            FBILLNO: this.dataForm.FBILLNO
            , FENTRYID: "1"
            , FYEAR: 2024
            , FGRADE: "大一"
            , FCLASS: "化学系1班"
            , FSTUDNAME: "曹操"
          },{
            FBILLNO: this.dataForm.FBILLNO
            , FENTRYID: "2"
            , FYEAR: 2024
            , FGRADE: "大一"
            , FCLASS: "化学系1班"
            , FSTUDNAME: "刘备"
          })
        });
      },
      //
      cancel() {
        this.list = [];
        this.visible = false;
      },
    },
  };
</script>